package registry

import (
	"crypto/tls"
	"kubeInstall/model/registry/http"
	rawhttp "net/http"
)

var registryClient *http.Client

func init() {
	c := initClient()
	if registryClient == nil {
		registryClient = c
	}
}
func initClient() *http.Client {
	conf := http.NewConfig()
	var tlsConfig = &tls.Config{
		InsecureSkipVerify: true,
	}
	conf.HttpTransport = &rawhttp.Transport{
		TLSClientConfig: tlsConfig,
	}

	c := http.NewClient(conf)
	return c
}
